home *** CD-ROM | disk | FTP | other *** search
- Path: earth.superlink.net!usenet
- From: Michael Rizzo <rizzom@mars.superlink.net>
- Newsgroups: comp.lang.c
- Subject: Q: pointers to pointers that point to structs?
- Date: Fri, 09 Feb 1996 23:13:02 -0500
- Organization: SuperNet Inc. (908) 828-8988
- Message-ID: <311C1B4E.217F@mars.superlink.net>
- NNTP-Posting-Host: ez16.superlink.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- Hi,
-
- I am having trouble dereferencing a pointer to a pointer to a struct.
- For simplicity just say the struct is:
- struct test
- {
- char teststr[10];
- int testint;
- }
-
- Now I have a function that just wants to print elements of the
- structure:
-
- void f(test **temp)
- {
- printf("%s %d",(please fill in the blank))
- }
-
- How to I get to test.teststr and test.testint from within the funtion.
- I have tried temp->teststr. I'm still pretty new to programming in C,
- and the book I'm using does not go into such topics, so any help would
- be greatly appreciated.
-
- Thanks
-
- Mike Rizzo
- e-mail: rizzom@mars.superlink.net
-